package com.minimoment.model.domain;


import java.io.Serializable;
import java.util.HashSet;
import java.util.Set;

/**
 * Created by etund on 2014/10/27.
 */
public class User implements Serializable{
    public User() {
    }

    /**
 * id					Long					(主键)
 loginName			String					登录名(唯一)
 gender             String                  性别
 email				String					邮箱
 avatarPath			String(1000)			头像路径
 schoolBeauty		schoolBeauty(一对一)	校花
 mFriends			Set(多对多)				影友(tb_movieFriend)
 FavoriousMovie		Set(多对多)				收藏的影片(tb_storeMovide)
 history				Set(一对多)				一个用户可以有多个订单(tb_user_order)
 comments			Set(一对多)				用户可以发出多个评论(tb_user_comments)
 school				School(多对一)			学校
 */
    private Long id;
    private String loginName;
    private String password;
    private String gender;
    private String email;
    private String imagePath;
    private Boolean isActive = false;
    private Set<User> myFriends = new HashSet<User>();
//    让Set是一个空集合，而不是一个空指针
    private Set<PuschaseHistory> histories = new HashSet<PuschaseHistory>();
    private Set<Movie>  movies = new HashSet<Movie>();
    private Set<UMcomemt> umComemts = new HashSet<UMcomemt>();
    private School school;
    private SchoolBeauty schoolBeauty;
    private Set<Little> littles = new HashSet<Little>();
    private Set<Theater> storeTheater = new HashSet<Theater>();

    public Set<Little> getLittles() {
        return littles;
    }

    public void setLittles(Set<Little> littles) {
        this.littles = littles;
    }

    public Set<Theater> getStoreTheater() {
        return storeTheater;
    }

    public void setStoreTheater(Set<Theater> storeTheater) {
        this.storeTheater = storeTheater;
    }

    public Boolean getIsActive() {
        return isActive;
    }

    public void setIsActive(Boolean isActive) {
        this.isActive = isActive;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getGender() {
        return gender;
    }

    public void setGender(String gender) {
        this.gender = gender;
    }

    public Set<PuschaseHistory> getHistories() {
        return histories;
    }

    public void setHistories(Set<PuschaseHistory> histories) {
        this.histories = histories;
    }

    public Set<Movie> getMovies() {
        return movies;
    }

    public void setMovies(Set<Movie> movies) {
        this.movies = movies;
    }

    public Set<UMcomemt> getUmComemts() {
        return umComemts;
    }

    public void setUmComemts(Set<UMcomemt> umComemts) {
        this.umComemts = umComemts;
    }

    public School getSchool() {
        return school;
    }

    public void setSchool(School school) {
        this.school = school;
    }

    public SchoolBeauty getSchoolBeauty() {
        return schoolBeauty;
    }

    public void setSchoolBeauty(SchoolBeauty schoolBeauty) {
        this.schoolBeauty = schoolBeauty;
    }

    public Long getId() {
        return id;
    }

    public void setId(Long id) {
        this.id = id;
    }

    public String getLoginName() {
        return loginName;
    }

    public void setLoginName(String loginName) {
        this.loginName = loginName;
    }

    public String getEmail() {
        return email;
    }

    public void setEmail(String email) {
        this.email = email;
    }

    public String getImagePath() {
        return imagePath;
    }

    public void setImagePath(String imagePath) {
        this.imagePath = imagePath;
    }

    public Set<User> getMyFriends() {
        return myFriends;
    }

    public void setMyFriends(Set<User> myFriends) {
        this.myFriends = myFriends;
    }

    @Override
    public String toString() {
        return "User{" +
                "id=" + id +
                ", loginName='" + loginName + '\'' +
                ", password='" + password + '\'' +
                ", gender='" + gender + '\'' +
                ", email='" + email + '\'' +
                ", imagePath='" + imagePath + '\'' +
                ", isActive=" + isActive +
                ", myFriends=" + myFriends +
                ", histories=" + histories +
                ", movies=" + movies +
                ", umComemts=" + umComemts +
                ", school=" + school +
                ", schoolBeauty=" + schoolBeauty +
                ", littles=" + littles +
                '}';
    }
}
